package com.dongdongshop.service.impl;

import com.dongdongshop.mapper.TbContentCategoryMapper;
import com.dongdongshop.pojo.TbContentCategory;
import com.dongdongshop.service.ContentCatService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@DubboService
public class ContentCatServiceImpl implements ContentCatService {

    @Resource
    private TbContentCategoryMapper contentCategoryMapper;

    @Override
    public List<TbContentCategory> selectInfo(String name) {
        List<TbContentCategory> list = contentCategoryMapper.selectInfo(name);
        return list;
    }

    @Override
    public void insertList(TbContentCategory tbContentCategory) {
        contentCategoryMapper.insertSelective(tbContentCategory);
    }

    @Override
    public TbContentCategory selectBycontentCatById(Long id) {

        return contentCategoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public void updateInfo(TbContentCategory tbContentCategory) {
        contentCategoryMapper.updateByPrimaryKeySelective(tbContentCategory);
    }

    @Override
    public void deleteInfo(Long[] ids) {
        contentCategoryMapper.deleteInfo(ids);
    }
}
